﻿namespace tools.common
{
    /// <summary>
    /// 路径工具类
    /// </summary>
    public static class PathTool
    {
        /// <summary>
        /// 组合路径并创建文件夹（已存在则不创建）
        /// </summary>
        /// <param name="pathSections">路径的部分（动态数组）</param>
        /// <returns>组合后的路径字符串</returns>
        public static string CombineAndCreateDirectory(params string[] pathSections)
        {
            string path = Path.Combine(pathSections);
            Directory.CreateDirectory(path);

            return path;
        }
    }
}
